package com.soil.code.generation.infrastructure.exception;

import com.ssy.gaea.common.exception.BaseException;

import java.util.Collections;

/**
 * @auth zeno
 * @date 2022/8/7 14:35
 */

public class CodeGenerationException extends BaseException{

	public CodeGenerationException(String msg) {
		this(msg, Collections.emptyList());
	}

	public CodeGenerationException(String msgPattern, Object... msgArgs) {
		super(null, msgPattern, msgArgs);
	}


	public CodeGenerationException(Throwable throwable) {
		this(throwable.getClass().getName(), throwable, throwable.getMessage(), Collections.emptyList());
	}

	public CodeGenerationException(Throwable throwable, String msg) {
		this(throwable, msg, Collections.emptyList());
	}

	public CodeGenerationException(Throwable throwable, String msgPattern, Object... msgArgs) {
		this(throwable.getClass().getName(), throwable, msgPattern, msgArgs);
	}

	@Override
	public String module() {
		return "CODE_GENERATION";
	}
}
